package org.javaboy.meeting.controller;

import org.javaboy.meeting.model.Department;
import org.javaboy.meeting.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class DepartmentController {

    @Autowired
    DepartmentService departmentService;

    @GetMapping("/dep")
    public String getDepById(Integer id) {
        System.out.println(id);
        Department dep = departmentService.getDepById(id);
        System.out.println(dep.toString());
        return "hello!";
    }

}
